#ifndef CHATLIST_MAIN_H
#define CHATLIST_MAIN_H

#include <QWidget>
#include "chat-widget/chatwidget.h"
#include "../../Src/DataBaseManage/databasemanage.h"
#include "../../Src/DataBaseManage/model/ChatRecord.h"
#include "../../Src/utils/appconfig.h"
namespace Ui {
class chatList_Main;
}

class chatList_Main : public QWidget
{
    Q_OBJECT

public:
    explicit chatList_Main(QWidget *parent = nullptr);
    ~chatList_Main();

    void openChatPage(const int _id);
    void addChatLeft(bool isMy,const QString avatar,const QString msg);
    void MsgALLClear();


signals:
    void MY_SeedMsg(const ChatRecord &msg);

private slots:
    void on_btn_pushMsg_clicked();

private:
    int m_user_id;
    // QString m_avatar_url;
    QString m_user_name;

private:
    ChatWidget *chat;
    Ui::chatList_Main *ui;
};

#endif // CHATLIST_MAIN_H
